import PropTypes from 'prop-types'
import React, { memo } from 'react'
import SectionItem from '../room-item'
import { RoomsWrapper } from './style'

const SectionRooms = memo((props) => {

  const { roomItems = [], itemWidth } = props
  return (
    <RoomsWrapper>
      {
        roomItems.map(item => {
          return <SectionItem key={item.id} item={item} itemWidth={itemWidth} />
        })
      }
    </RoomsWrapper>

  )
})

SectionRooms.propTypes = {
  roomItems: PropTypes.array,
  itemWidth: PropTypes.string
}

export default SectionRooms 